<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>index</title>
		<meta name="referrer" content="never" />
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../../../css/mui.min.css">
		<link rel="stylesheet" href="../../static/components/components.css" />
		<link rel="stylesheet" href="../../static/css/common.css">
		<style>
			.mui-bar-nav ~ .mui-content .mui-pull-top-pocket{
				top:180px !important;
			}
			.label{
				width: 18vw;
			}
			.item-title{
			width: 20vw;
			color: #275EB1 !important;
			text-decoration: underline;
			}
			.list-head{
				width: 94vw;
				margin-left: 3vw;
				background-color: #fff;
				padding: 10px;
				margin-bottom: 10px;
			}
			.myheigth {
				height: 9vw;
			}
			.list button{
				margin: 0 !important;
				padding: 0 4vw !important;
			}
		</style>
	</head>

	<body>

		<header class="mui-bar mui-bar-nav mui-bar-nav-bg">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">网络安全防护设备检查</h1>
		</header>
		<div class="mui-content" id="content" v-cloak>
			<!-- <div style="position: sticky;background: #efeff4;top: 44px;z-index: 11;" class="top">
				<transition name="fade">
					<div class="drop-menulist" v-if="showMenu">
						<div @click="menuClick(item)" v-for="(item,index) in menuList" :key="index">
							{{item.name}}
						</div>
					</div>
				</transition>
				<div class="search-model" style="width:96vw">
					<div class="mui-input-row mui-search">
						<input type="search" class="mui-input-clear" style="background-color: #fff;" placeholder="请输入关键字信息">
					</div>
				</div>
			</div> -->
			<div style="position: sticky;top: 45px;z-index: 11;" class="flex-between list-head">
				<div class="flex-row" style="font-weight: bold;">
					<div class="icon"></div>
					本次检查记录
				</div>
				<button v-if="isMyEditor" @tap="add" class="submit_btn" style="	margin: 0 !important;
					padding: 0 4vw !important;">新增</button>
			</div>
			<div id="scroll">
				<div class="list" id="list">
					<div v-for="(item,index) in list" :key="index">
						<div>
							<div class="flex-between">
								<div>
									<div class="flex-row">
										<div class="flex-row">
											<span class="label">设备名称</span>
											<div class="item-title" @tap="edit(item,index)">{{item.deviceName}}</div>
										</div>
									</div>

									<div class="flex-row">
										<div class="label">巡检时间</div>
										<div>{{item.checkDate | toDate}}</div>
									</div>
									<div class="flex-row">
										<div style="margin-left: 10px;"><span style="margin-right: 5px;">巡检人</span>{{"["+item.checkStaffCode+"]"+item.checkStaffName}}</div>
									</div>
								</div>
								<button @tap="del(item,index)" v-if="isMyEditor" class="cancel_btn">删除</button>
							</div>
						</div>
					</div>
					<div v-if="!isMyEditor" class="flex-row">
						<span class="label">其他情况</span>
						<textarea style="width: 70vw;" placeholder="无其他情况" v-model="elseDesc" disabled ></textarea>
					</div>
				</div>
			</div>
			<div class="popup-bg" v-if="addOrEdit">
				<div style="padding: 15px 15px 0px" class="add-box" @click@tap.stop="clickStop">
					<div class="mt-10">
						<div class="flex-between myheigth m-10">
							<div>
								检查日期 {{formData.checkDate}}
							</div>
						</div>
						<div class="flex-between myheigth m-10">
							<div>
								巡视人 {{formData.checkStaffCodeName}}
							</div>
						</div>
						<div class="flex-between myheigth m-10">
							设备名称 <input :disabled="!isMyEditor" @input="changeCheck" placeholder="请输入设备名称" maxlength="60" v-model="formData.deviceName" :onkeyup="this.formData.deviceName = this.formData.deviceName.replace(/\s+/g,'')" class="itme-content"></input>
						</div>
						<div class="flex-between myheigth m-10">
							所需间隔 <input :disabled="!isMyEditor" @input="changeCheck" placeholder="请输入所需间隔" maxlength="60" class="itme-content" v-model="formData.bay" :onkeyup="this.formData.bay = this.formData.bay.replace(/\s+/g,'')"></input>
						</div>
						<div class="flex-between myheigth m-10">
							是否警告 <div class="flex-row">
								是 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isWarning" value="1" style="width: 18px;margin-right: 5px;" type="radio" id="">
								否 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isWarning" value="0" style="width: 18px;margin-right: 5px;" type="radio" id="">
							</div>
						</div>
						<div class="flex-between myheigth m-10">
							运行环境是否正常<div class="flex-row">
								是 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isAmbientNormal" value="1" style="width: 18px;margin-right: 5px;" type="radio" id="">
								否 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isAmbientNormal" value="0" style="width: 18px;margin-right: 5px;" type="radio" id="">
							</div>
						</div>
						<div class="flex-between myheigth m-10">
							是否有非正常业务设备<div class="flex-row">
								是 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isHaveAbnormalDevice" value="1" style="width: 18px;margin-right: 5px;" type="radio"
								 id="">
								否 <input @change="yesNoChange" :disabled="!isMyEditor" @change="changeCheck" v-model="formData.isHaveAbnormalDevice" value="0" style="width: 18px;margin-right: 5px;" type="radio"
								 id="">
							</div>
						</div>
						<div v-if="isMyEditor" class="flex-between myheigth m-10">
							问题记录<input :disabled="!isMyEditor" @input="changeCheck" placeholder="请输入记录问题" maxlength="60" class="itme-content" v-model="formData.problemLog"></input>
						</div>
						<div v-if="!isMyEditor" class="flex-between myheigth m-10">
							问题记录<input :disabled="true" @input="changeCheck" placeholder="" maxlength="60" class="itme-content" v-model="formData.problemLog"></input>
						</div>
						<!-- <div style="margin: 5px 0;">其他情况</div>
					<textarea placeholder="请输入其他情况" maxlength="600" name="" id="" v-model="advance">
						</textarea> -->

						<!-- <div class="mt-10">
							<div >附件</div>
							<div class="icon_upload"></div>
						</div> -->
					</div>
					<div :style="!isMyEditor?'justify-content:center':''" class="pop-bottom">
						<div v-if="isMyEditor" @tap="addList">{{isEdit?'修改':'添加'}}</div>
						<div v-if="!isMyEditor">
							
						</div>
						<div class="color-red" @tap="clearFormateData">取消</div>
					</div>
				</div>
			</div>
			<div class="popup-bg" v-if="showAdd">
				<div style="padding: 15px 15px 0px" class="add-box" @click@tap.stop="clickStop">
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">隐患描述
						</div>
					</div>
					<div style="max-height: 30vw;overflow: auto;">
						<div v-for="item in defectInfoList">
							{{item.name}}
						</div>
						<div style="text-align: center;" v-if="defectInfoList.length==0">
							暂无数据
						</div>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">设备其他情况说明
						</div>
					</div>
					<div class="flex-row m-10">
						<div class="pop-label">其他</div>
						<textarea v-model="networkSafe.elseDesc" placeholder="请输入情况说明" maxlength="600" name="" id="">
						</textarea>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">选择审批人
						</div>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div class="flex-row m-10">
						<div class="pop-label">审批人</div>
						<personselect v-model="approveCodeName" :issingle="false" ref="personselect"></personselect>
					</div>
					<div class="pop-bottom">
						<div @tap="save(1)">提交</div>
						<div class="color-red" @tap="clearDefectInfo">取消</div>
					</div>
				</div>
			</div>
			<!-- 退回通过弹窗 -->
			<div class="popup-bg" v-if="isApprove">
				<div style="padding: 15px 15px 0px" class="add-box" @click@tap.stop="clickStop">
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">隐患描述
						</div>
					</div>
					<div style="max-height: 30vw;overflow: auto;">
						<div v-for="item in defectInfoList">
							{{item.name}}
						</div>
						<div style="text-align: center;" v-if="defectInfoList.length==0">
							暂无数据
						</div>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">意见描述
						</div>
					</div>
					<div class="flex-row m-10">
						<div class="pop-label">意见描述</div>
						<textarea style="width: 50vw;" v-model="approveDesc" placeholder="请输入意见描述" maxlength="255" name="" id="">
						</textarea>
					</div>
					<!-- <hr size="1" style="color: #999;border-style: dashed; widows: 250px;" /> -->
					<!-- <div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">选择审批人
						</div>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div class="flex-row m-10">
						<div class="pop-label">审批人</div>
						<personselect v-model="approveCodeName" :issingle="true" ref="personselect"></personselect>
					</div> -->
					<div class="pop-bottom">
						<div @tap="saveApprove()">{{approveDialogTips?'通过':'退回'}}</div>
						<div class="color-red" @tap="clearDefectInfo">取消</div>
					</div>
				</div>
			</div>
			<div class="flex-between list-head">
				<div class="flex-row" style="font-weight: bold;">
					<div class="icon"></div>
					流程日志
				</div>
			</div>
			<processlog :processlogid='workId'></processlog>
			<div style="height: 60px;">
			</div>
			<div class="flex-between fixed-bottom">
				<button v-if="isShowEdit()" @tap="save(0)" class="submit_btn">保存</button>
				<button v-if="isShowHandle()" @tap="approveInitDefectInfo('back')" class="cancel_btn">
					退回
				</button>
				<button v-if="isShowHandle()" @tap="approveInitDefectInfo('approve')" class="submit_btn">通过</button>
				<button v-if="isShowEdit()" @tap="initDefectInfo" class="submit_btn">提交</button>
				<button @click="goBack" class="cancel_btn">
					返回
				</button>
			</div>
		</div>
		<script src="../../../../js/mui.min.js"></script>
		<script src="../../../../js/vue.js"></script>
		<script src="../../static/js/neiosCommon.js"></script>  <!--公共js页面必需-->
		<script src="../../static/components/personSelect.js"></script>
		<!--人员查询组件-->
		<script type="text/javascript" src="../../static/js/neiosRequst.js"></script>
		<script type="text/javascript" src="../../../../js/jquery-3.2.1.min.js"></script>
		<script src="../../static/components/processLog.js"></script>  <!--流程日志-->
		<script src="./list.js"></script>
	</body>

</html>
